package org.kl.bpm.rule;

import java.util.List;

import org.kl.bf.utils.ApplicationContextHelper;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * 获得指定用户的上级领导.
 * 
 */
public class UserAssigneeRule extends AbstractAssigneeRule {
	private JdbcTemplate jdbcTemplate;

	public List<String> process(String value, String initiator) {
		return null;
	}

	/**
	 * 获得员工的直接上级.
	 */
	public String process(String userName) {
		if (jdbcTemplate == null) {
			jdbcTemplate = ApplicationContextHelper.getBean(JdbcTemplate.class);
		}

		String userId = getUserIdByUserName(userName);
		return userId;
	}
}
